// IFolderArchive.h

#ifndef __IFOLDER_ARCHIVE_H
#define __IFOLDER_ARCHIVE_H

#include "Common/Archive/IArchive.h"
#include "Common/Archive/LoadCodecs.h"
#include "Common/FileSystem/IFolder.h"

#include "Common/Archive/ExtractMode.h"
#include "Common/Archive/IFileExtractCallback.h"


namespace Common
{
namespace Agent
{

MIDL_INTERFACE("23170F69-40C1-278A-0000-000100050000")
IArchiveFolder: public IUnknown
{
  STDMETHOD(Extract)(const UINT32 *indices, UINT32 numItems, 
      Common::Archive::Extract::PathMode pathMode, 
      Common::Archive::Extract::OverwriteMode overwriteMode, 
      const wchar_t *path, INT32 testMode, 
      IFolderArchiveExtractCallback *extractCallback2) PURE;
};


MIDL_INTERFACE("23170F69-40C1-278A-0000-0001000E0000")
IInFolderArchive: public IUnknown
{
  STDMETHOD(Open)(IInStream *inStream, const wchar_t *filePath, 
	const wchar_t *arcFormat, BSTR *archiveTypeRes, IArchiveOpenCallback *openArchiveCallback) PURE; 
  STDMETHOD(ReOpen)(IArchiveOpenCallback *openArchiveCallback) PURE; 
  STDMETHOD(Close)() PURE; 
  STDMETHOD(GetNumberOfProperties)(UINT32 *numProperties) PURE; 
  STDMETHOD(GetPropertyInfo)(UINT32 index, BSTR *name, PROPID *propID, VARTYPE *varType) PURE;
  STDMETHOD(BindToRootFolder)(IFolderFolder **resultFolder) PURE; 
  STDMETHOD(Extract)(Common::Archive::Extract::PathMode pathMode, 
	Common::Archive::Extract::OverwriteMode overwriteMode, const wchar_t *path, 
      INT32 testMode, IFolderArchiveExtractCallback *extractCallback2) PURE; 
};

MIDL_INTERFACE("23170F69-40C1-278A-0000-0001000B0000")
IFolderArchiveUpdateCallback: public IProgress
{
  STDMETHOD(CompressOperation)(const wchar_t *name) PURE; 
  STDMETHOD(DeleteOperation)(const wchar_t *name) PURE; 
  STDMETHOD(OperationResult)(INT32 operationResult) PURE; 
  STDMETHOD(UpdateErrorMessage)(const wchar_t *message) PURE; 
  STDMETHOD(SetNumFiles)(UINT64 numFiles) PURE; 
};

MIDL_INTERFACE("23170F69-40C1-278A-0000-0001000A0000")
IOutFolderArchive: public IUnknown
{
	STDMETHOD(SetFolder)(IFolderFolder *folder) PURE; 
	STDMETHOD(SetFiles)(const wchar_t *folderPrefix, const wchar_t **names, UINT32 numNames) PURE; 
	STDMETHOD(DeleteItems)(const wchar_t *newArchiveName, 
		const UINT32 *indices, UINT32 numItems, IFolderArchiveUpdateCallback *updateCallback) PURE; 
	STDMETHOD(DoOperation)(Common::Archive::CCodecs *codecs, int index, 
		const wchar_t *newArchiveName, const BYTE *stateActions, const wchar_t *sfxModule, 
		IFolderArchiveUpdateCallback *updateCallback) PURE; 
	STDMETHOD(DoOperation2)(const wchar_t *newArchiveName, const BYTE *stateActions, 
		const wchar_t *sfxModule, IFolderArchiveUpdateCallback *updateCallback) PURE;  
};

}}

#endif

